package OBS;

/**
 *
 * @author Daniel Koch
 */
public class BatchReportSystem {
    private int ID;
    private String name;
    private BatchReportInterval batchReportInterval;
    private BatchReport[] batchReports = new BatchReport[0];
    private BatchReport[] currentBatchReports = new BatchReport[0];

    /**
     * 
     * @param ID
     * @param name
     * @param batchReportInterval
     * @param batchReports
     */
    public BatchReportSystem(int ID, String name, BatchReportInterval batchReportInterval, BatchReport[] batchReports) {
        this.ID = ID;
        this.name = name;
        this.batchReportInterval = batchReportInterval;
        if(batchReports != null) {
            this.batchReports = batchReports;
        }
    }

    /**
     * 
     * @param ID
     * @param name
     * @param batchReportInterval
     * @param batchReports
     * @param currentBatchReports
     */
    public BatchReportSystem(int ID, String name, BatchReportInterval batchReportInterval, BatchReport[] batchReports, BatchReport[] currentBatchReports) {
        this.ID = ID;
        this.name = name;
        this.batchReportInterval = batchReportInterval;
        if(batchReports != null) {
            this.batchReports = batchReports;
        }
        if(currentBatchReports != null) {
            this.currentBatchReports = currentBatchReports;
        }
    }

    /**
     * 
     * @return
     */
    public String toString() {
        return this.name;
    }

    /**
     * 
     * @return
     */
    public int getID() {
        return this.ID;
    }

    /**
     * 
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 
     * @return
     */
    public String getName() {
        return this.name;
    }

    /**
     * 
     * @param batchReportInterval
     */
    public void setBatchReportInterval(BatchReportInterval batchReportInterval) {
        this.batchReportInterval = batchReportInterval;
    }

    /**
     * 
     * @return
     */
    public BatchReportInterval getBatchReportInterval() {
        return this.batchReportInterval;
    }

    /**
     * 
     * @return
     */
    public BatchReport[] getBatchReports() {
        return this.batchReports;
    }

    /**
     * 
     * @return
     */
    public BatchReport[] getCurrentBatchReports() {
        return this.currentBatchReports;
    }
    
    /**
     * 
     * @param o
     * @return
     */
    public boolean equals(Object o) {
        if (!(o instanceof BatchReportSystem)) {
            return false;
        }
        BatchReportSystem batchReportSystem = (BatchReportSystem)o;
        return (this.name.equals(batchReportSystem.getName()) && (this.ID == batchReportSystem.getID()));
    }
}
